using System;
using System.Web;
using Castle.Windsor;

namespace AspView.com
{
	public class Global : HttpApplication, IContainerAccessor
	{
		static IWindsorContainer container;

		public void Application_OnStart()
		{
			container = new IoCContainer();
			((IoCContainer)container).Initialize();
		}

		public void Application_OnEnd()
		{
			container.Dispose();
		}

		#region IContainerAccessor Members

		public IWindsorContainer Container
		{
			get { return container; }
		}

		#endregion
	}
}